package com.yiqi.lottery.feature.mine.view.adapter;

import android.text.Html;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.suozhang.framework.framework.AM;
import com.yiqi.lottery.R;
import com.yiqi.lottery.common.util.DateTool;
import com.yiqi.lottery.entity.bo.CharsBo;
import com.yiqi.lottery.entity.bo.MessageBo;

public class NUmberAdapter extends BaseQuickAdapter<CharsBo, BaseViewHolder> {
    public NUmberAdapter() {
        super(R.layout.item_number_manger);
    }

    @Override
    protected void convert(BaseViewHolder helper, CharsBo item) {
        String stauts=item.getOrder_status()==1?"进行中":item.getOrder_status()==2?"已完成":item.getOrder_status()==3?"已取消":"";
        helper.setText(R.id.tv_user_number_prize, Html.fromHtml("金额：<font color=\"#333333\">共"+ item.getOrder_amount()+"元</font>" ))
                .setText(R.id.tv_user_number_type_name, "剩"+(item.getCharsing_num()-item.getHas_charsing())+"期  共（"+ item.getCharsing_num()+"）期" )
                .setText(R.id.tv_user_number_state, Html.fromHtml("状态：<font color=\"#333333\">"+stauts +"</font>" ))
                .setText(R.id.tv_user_number_date, "下单时间："+DateTool.TimeStamp2Date(item.getCreated_at()+""));
        ;

    }
}
